class rate():
    id = ""
    window = ""
    clear =""
    alert = ""
    limit = ""
    disconnect = ""
    current = ""
    max = ""
    lastTime = ""
    currentState =""

    def __init__(self):
            id = ""
            window = ""
            clear =""
            alert = ""
            limit = ""
            disconnect = ""
            current = ""
            max = ""
            lastTime = ""
            currentState =""

    def readRate(self, data):
        self.id = int(data[0:4], 16)
        self.window = int(data[4:12], 16)
        self.clear = int(data[12:20], 16)
        self.alert = int(data[20:28], 16)
        self.limit = int(data[28:36], 16)
        self.disconnect = int(data[36:44], 16)
        self.current = int(data[44:52], 16)
        self.max = int(data[52:60], 16)
        self.lastTime = int(data[60:68], 16)
        self.currentState = int(data[68:70], 16)
        
    def __str__(self):
        return "ID: "+str(self.id) +"\nwindow: "+str(self.window)+"\nclear"+ str(self.clear)+"\nalert"+str(self.alert)+"\nlimit: "+str(self.limit) +"\ndisconnect: "+str(self.disconnect)+"\ncurrent: "+ str(self.current)+"\nmax : " +str(self.max)+"last: "+str(self.lastTime)+"\nState: " + str(self.currentState)+'\n'
